Git aliases
Leer hoe je aliases en stenonotaties maakt voor git commando's
Aliases voor veel gebruikte commando's
Voor Windows gebruikers
Voer de volgende instructies uit:
git config --global alias.co checkoutgit config --global alias.ci commitgit config --global alias.st statusgit config --global alias.br branchgit config --global alias.hist "log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short"git config --global alias.type 'cat-file -t'git config --global alias.dump 'cat-file -p'
Voor Unix/Mac gebruikers
git status, git add, git commit, en git checkout zijn veel gebruikte commando's. Het kan wenselijk zijn stenonotaties ervoor te hebben.
Voor de volgende regels toe in je .gitconfig file in your $HOME directory.
[alias] co = checkout ci = commit st = status br = branch hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short type = cat-file -t dump = cat-file -p
We hebben al gesproken over add, commit, status commando's. In een vorige les leerden we werken met het log commando en binnenkort gaan we aan de slag met het checkout commando. Wat we in deze les al leren is dat je git st kunt typen i.p.v. git status. Een van de aliases die ik veel gebruik is git hist omdat die een echt lang log commando in één woord samenvat.
Zolang je git leerst is het goed om de stenotaties niet te gebruiken maar voor het lange log commando zal ik het in deze cursus wel doen.
2017-01-25 12:19:31